package com.my.test.web.student;

import com.my.test.service.student.model.Student;
import com.my.test.service.student.service.StudentService;
import com.my.test.service.util.CommonLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping(value = "/student")
public class StudentCtl {

    @Autowired
    private StudentService studentService;

    @RequestMapping(value = "/find_all")
    public void findAll(){
        List<Student> list = studentService.findAllStudent();
        CommonLogger.info(list.size());
        for (Student s : list){
            CommonLogger.info(s.toString());
        }
    }
}